CC		= arm-linux-gcc
LD 		= arm-linux-ld
OBJCOPY	= arm-linux-objcopy
OBJDUMP	= arm-linux-objdump
AR		= arm-linux-ar

NAME		:= led
MKHEADER	:=../tools/make_image/mkv210_image

led.bin: led.o start.o
	$(LD) -Ttext 0x0 -o led.elf $^
	$(OBJCOPY) -O binary led.elf led.bin
	$(OBJDUMP) -D led.elf > led_elf.dis
	@echo make header information for irom booting
	$(MKHEADER) $@ 210.bin
	
%.o : %.S
	arm-linux-gcc -o $@ $< -c -nostdlib

%.o : %.c
	arm-linux-gcc -o $@ $< -c -nostdlib

clean:
	rm *.o *.elf *.bin *.dis mkx210 -f

	
	